package com.ps.pspreview;

import android.content.Context;
import android.content.SharedPreferences;

public class PreUtils {
	public static final String SERVER_NAME_KEY = "server_name";
	public static final String SERVER_PASSWORD_KEY = "server_password";
	private static final String PRE_NAME = "com.ps.pspreview.preferences";
	
	
	private SharedPreferences sp;
	private Context mContext;
	
	public PreUtils(Context context){
		this.mContext = context;
		this.sp = mContext.getSharedPreferences(PRE_NAME, 0);
	}
	
	public void putValue(String key, String value){
		SharedPreferences.Editor editor = sp.edit();
		editor.putString(key, value);
		editor.commit();
	}
	
	public String getValue(String key){
		return sp.getString(key, null);
	}
}
